package io;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class Demo08 {
    public static void main(String[] args) {
        try (Reader reader = new FileReader("d:/text.txt")) {
            int result = -1;
            while ((result = reader.read()) != -1) {
                System.out.print((char)result);
            }
        }
        catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
